/*
    创建图书类
 */
public class Work05 {
    private int id;
    private String name;
    private int price;
    //建立空参

    public Work05() {
    }
    //建立无参

    public Work05(int id, String name, int price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }
    //建立有参

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }
    public void print(){
        System.out.println("图书编号:"+id);
        System.out.println("书名"+name);
        System.out.println("价格"+price);
    }
}
